<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style type="text/css">
        .header,.main,.footer{
            width:500px;

        }
        .header,.footer{
            height: 100px;
            background: #000;
        }
        .main{
            /*height: 300px;*/
            background: #eee;
            margin: 10px 0;
        }
        .content{
            width: 300px;
            height: 300px;
            background: orange;
            float: left;
        }
        .sidebar{
            width: 190px;
            height: 300px;
            background: green;
            float: right;
        }
        .clearfix:after{
            content: " ";
            display: block;
            height: 0;
            line-height: 0;
            visibility: hidden;
            clear: both;
        }

    </style>
</head>
<body>
<div class="header"></div>
<div class="main clearfix">
    <div class="content"></div>
    <div class="sidebar"></div>
</div>
<div class="footer"></div>
</body>
</html>